package org.wzl.todolisthelper.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.transaction.annotation.Transactional;
import org.wzl.todolisthelper.convert.TaskEventConvert;
import org.wzl.todolisthelper.domain.TaskEvent;
import org.wzl.todolisthelper.enumerate.AddTaskEventDTO;
import org.wzl.todolisthelper.service.TaskEventService;
import org.wzl.todolisthelper.mapper.TaskEventMapper;
import org.springframework.stereotype.Service;

/**
* @author weizhilong
* @description 针对表【t_task_event】的数据库操作Service实现
* @createDate 2025-04-07 21:30:43
*/
@Service
public class TaskEventServiceImpl extends ServiceImpl<TaskEventMapper, TaskEvent>
    implements TaskEventService{

    @Resource
    private TaskEventConvert taskEventConvert;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public TaskEvent addTaskEvent(AddTaskEventDTO addTaskEventDTO) {
        TaskEvent aDo = taskEventConvert.toDO(addTaskEventDTO);
        save(aDo);
        return aDo;
    }

}




